Skip to content

migrate from CI api key to CI auth token #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 19, 2025
Merged

Conversation

alexrashed
Copy link
Member

Motivation

With LocalStack 4.0.0, API keys have been fully migrated to auth tokens by also providing CI auth tokens.
This PR switches to using a new CI auth token instead of the old CI API key in the pipeline.

Changes

  • Use auth token instead of API keys.

/cc @SimonWallner @ackdav

@alexrashed alexrashed added the enhancement New feature or request label Feb 19, 2025
@alexrashed alexrashed requested a review from dfangl February 19, 2025 09:32
Copy link

github-actions bot commented Feb 19, 2025

Moto Integration Tests against LocalStack Results

0 files   -     1  0 suites   - 1   0s ⏱️ - 5h 17m 57s
0 tests  - 7 188  0 ✅  - 3 925  0 💤  - 218  0 ❌  - 3 000 
0 runs   - 7 192  0 ✅  - 3 924  0 💤  - 218  0 ❌  - 3 001 

Results for commit 966ac93. ± Comparison against base commit 4c0c7c4.

♻️ This comment has been updated with latest results.

@alexrashed
Copy link
Member Author

FYI: I cancelled the pipeline run after the startup was successful (to avoid burning 5 hours of compute).

Copy link
Member

@dfangl dfangl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should change

"DNS_ADDRESS=127.0.0.1 EXTENSION_DEV_MODE=1 DEBUG=1 DISABLE_EVENTS=1 LOCALSTACK_API_KEY=$LOCALSTACK_API_KEY localstack start -d"
here as well. I noticed an empty api key passed on the restarts of LS in the test pipelines - should not be a problem (as an empty value will be treated identically to a not set one), but still something to change.
Honestly, I do not see much value in setting the api key or auth token manually there anyway, as os.system should inherit the environment from the parent process.

@alexrashed
Copy link
Member Author

Thanks a lot, @dfangl! An incredibly good catch! 🚀 💯
I still kept the env var in the os.system command, because I guess it might be a bit safer. But let me know if you think that I should remove it right away.

@alexrashed alexrashed requested a review from dfangl February 19, 2025 12:56
Copy link
Member

@dfangl dfangl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine to keep it in, should not change anything! (We are literally taking an environment variable from the environment and assigning it to the same name). It is fine to keep it in for clarity.

I rerun the run to get at least one restart of LS in the run (yours was cancelled a tad to early), I will cancel it once I see LS restart once

@dfangl
Copy link
Member

dfangl commented Feb 19, 2025

The automatic restarts look good, ready to go from my side!

@alexrashed alexrashed merged commit e30f0fe into main Feb 19, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants